set(LLVM_Analysis_DIR ${LLVM_MAIN_SRC_DIR}/lib/Analysis)

add_llvm_component_library(LLVMBuddyAnalysis

  ${LLVM_Analysis_DIR}/AliasAnalysis.cpp
  ${LLVM_Analysis_DIR}/AliasAnalysisEvaluator.cpp
  ${LLVM_Analysis_DIR}/AliasSetTracker.cpp
  ${LLVM_Analysis_DIR}/Analysis.cpp
  ${LLVM_Analysis_DIR}/AssumeBundleQueries.cpp
  ${LLVM_Analysis_DIR}/AssumptionCache.cpp
  ${LLVM_Analysis_DIR}/BasicAliasAnalysis.cpp
  ${LLVM_Analysis_DIR}/BlockFrequencyInfo.cpp
  ${LLVM_Analysis_DIR}/BlockFrequencyInfoImpl.cpp
  ${LLVM_Analysis_DIR}/BranchProbabilityInfo.cpp
  ${LLVM_Analysis_DIR}/CFG.cpp
  ${LLVM_Analysis_DIR}/CFGPrinter.cpp
  ${LLVM_Analysis_DIR}/CFGSCCPrinter.cpp
  ${LLVM_Analysis_DIR}/CGSCCPassManager.cpp
  ${LLVM_Analysis_DIR}/CallGraph.cpp
  ${LLVM_Analysis_DIR}/CallGraphSCCPass.cpp
  ${LLVM_Analysis_DIR}/CallPrinter.cpp
  ${LLVM_Analysis_DIR}/CaptureTracking.cpp
  ${LLVM_Analysis_DIR}/CmpInstAnalysis.cpp
  ${LLVM_Analysis_DIR}/CostModel.cpp
  ${LLVM_Analysis_DIR}/CodeMetrics.cpp
  ${LLVM_Analysis_DIR}/ConstantFolding.cpp
  ${LLVM_Analysis_DIR}/CtxProfAnalysis.cpp
  ${LLVM_Analysis_DIR}/CycleAnalysis.cpp
  ${LLVM_Analysis_DIR}/DDG.cpp
  ${LLVM_Analysis_DIR}/DDGPrinter.cpp
  ${LLVM_Analysis_DIR}/ConstraintSystem.cpp
  ${LLVM_Analysis_DIR}/Delinearization.cpp
  ${LLVM_Analysis_DIR}/DemandedBits.cpp
  ${LLVM_Analysis_DIR}/DependenceAnalysis.cpp
  ${LLVM_Analysis_DIR}/DependenceGraphBuilder.cpp
  ${LLVM_Analysis_DIR}/DevelopmentModeInlineAdvisor.cpp
  ${LLVM_Analysis_DIR}/DomConditionCache.cpp
  ${LLVM_Analysis_DIR}/DomPrinter.cpp
  ${LLVM_Analysis_DIR}/DomTreeUpdater.cpp
  ${LLVM_Analysis_DIR}/DominanceFrontier.cpp
  ${LLVM_Analysis_DIR}/DXILResource.cpp
  ${LLVM_Analysis_DIR}/DXILMetadataAnalysis.cpp
  ${LLVM_Analysis_DIR}/FunctionPropertiesAnalysis.cpp
  ${LLVM_Analysis_DIR}/GlobalsModRef.cpp
  ${LLVM_Analysis_DIR}/GuardUtils.cpp
  ${LLVM_Analysis_DIR}/HeatUtils.cpp
  ${LLVM_Analysis_DIR}/IRSimilarityIdentifier.cpp
  ${LLVM_Analysis_DIR}/IVDescriptors.cpp
  ${LLVM_Analysis_DIR}/IVUsers.cpp
  ${LLVM_Analysis_DIR}/ImportedFunctionsInliningStatistics.cpp
  ${LLVM_Analysis_DIR}/IndirectCallPromotionAnalysis.cpp
  ${LLVM_Analysis_DIR}/InlineCost.cpp
  ${LLVM_Analysis_DIR}/InlineAdvisor.cpp
  ${LLVM_Analysis_DIR}/InlineOrder.cpp
  ${LLVM_Analysis_DIR}/InlineSizeEstimatorAnalysis.cpp
  ${LLVM_Analysis_DIR}/InstCount.cpp
  ${LLVM_Analysis_DIR}/InstructionPrecedenceTracking.cpp
  ${LLVM_Analysis_DIR}/InstructionSimplify.cpp
  ${LLVM_Analysis_DIR}/InteractiveModelRunner.cpp
  ${LLVM_Analysis_DIR}/LastRunTrackingAnalysis.cpp
  ${LLVM_Analysis_DIR}/LazyBranchProbabilityInfo.cpp
  ${LLVM_Analysis_DIR}/LazyBlockFrequencyInfo.cpp
  ${LLVM_Analysis_DIR}/LazyCallGraph.cpp
  ${LLVM_Analysis_DIR}/LazyValueInfo.cpp
  ${LLVM_Analysis_DIR}/Lint.cpp
  ${LLVM_Analysis_DIR}/Loads.cpp
  ${LLVM_Analysis_DIR}/Local.cpp
  ${LLVM_Analysis_DIR}/LoopAccessAnalysis.cpp
  ${LLVM_Analysis_DIR}/LoopAnalysisManager.cpp
  ${LLVM_Analysis_DIR}/LoopCacheAnalysis.cpp
  ${LLVM_Analysis_DIR}/LoopNestAnalysis.cpp
  ${LLVM_Analysis_DIR}/LoopUnrollAnalyzer.cpp
  ${LLVM_Analysis_DIR}/LoopInfo.cpp
  ${LLVM_Analysis_DIR}/LoopPass.cpp
  ${LLVM_Analysis_DIR}/MLInlineAdvisor.cpp
  ${LLVM_Analysis_DIR}/MemDerefPrinter.cpp
  ${LLVM_Analysis_DIR}/MemoryBuiltins.cpp
  ${LLVM_Analysis_DIR}/MemoryDependenceAnalysis.cpp
  ${LLVM_Analysis_DIR}/MemoryLocation.cpp
  ${LLVM_Analysis_DIR}/MemoryProfileInfo.cpp
  ${LLVM_Analysis_DIR}/MemorySSA.cpp
  ${LLVM_Analysis_DIR}/MemorySSAUpdater.cpp
  ${LLVM_Analysis_DIR}/ModelUnderTrainingRunner.cpp
  ${LLVM_Analysis_DIR}/ModuleDebugInfoPrinter.cpp
  ${LLVM_Analysis_DIR}/ModuleSummaryAnalysis.cpp
  ${LLVM_Analysis_DIR}/MustExecute.cpp
  ${LLVM_Analysis_DIR}/NoInferenceModelRunner.cpp
  ${LLVM_Analysis_DIR}/ObjCARCAliasAnalysis.cpp
  ${LLVM_Analysis_DIR}/ObjCARCAnalysisUtils.cpp
  ${LLVM_Analysis_DIR}/ObjCARCInstKind.cpp
  ${LLVM_Analysis_DIR}/OptimizationRemarkEmitter.cpp
  ${LLVM_Analysis_DIR}/OverflowInstAnalysis.cpp
  ${LLVM_Analysis_DIR}/PHITransAddr.cpp
  ${LLVM_Analysis_DIR}/PhiValues.cpp
  ${LLVM_Analysis_DIR}/PostDominators.cpp
  ${LLVM_Analysis_DIR}/ProfileSummaryInfo.cpp
  ${LLVM_Analysis_DIR}/PtrUseVisitor.cpp
  ${LLVM_Analysis_DIR}/RegionInfo.cpp
  ${LLVM_Analysis_DIR}/RegionPass.cpp
  ${LLVM_Analysis_DIR}/RegionPrinter.cpp
  ${LLVM_Analysis_DIR}/ReplayInlineAdvisor.cpp
  ${LLVM_Analysis_DIR}/ScalarEvolution.cpp
  ${LLVM_Analysis_DIR}/ScalarEvolutionAliasAnalysis.cpp
  ${LLVM_Analysis_DIR}/ScalarEvolutionDivision.cpp
  ${LLVM_Analysis_DIR}/ScalarEvolutionNormalization.cpp
  ${LLVM_Analysis_DIR}/StackLifetime.cpp
  ${LLVM_Analysis_DIR}/StackSafetyAnalysis.cpp
  ${LLVM_Analysis_DIR}/StructuralHash.cpp
  ${LLVM_Analysis_DIR}/SyntheticCountsUtils.cpp
  ${LLVM_Analysis_DIR}/TFLiteUtils.cpp
  ${LLVM_Analysis_DIR}/TargetLibraryInfo.cpp
  ${LLVM_Analysis_DIR}/TargetTransformInfo.cpp
  ${LLVM_Analysis_DIR}/TensorSpec.cpp
  ${LLVM_Analysis_DIR}/Trace.cpp
  ${LLVM_Analysis_DIR}/TrainingLogger.cpp
  ${LLVM_Analysis_DIR}/TypeBasedAliasAnalysis.cpp
  ${LLVM_Analysis_DIR}/TypeMetadataUtils.cpp
  ${LLVM_Analysis_DIR}/UniformityAnalysis.cpp
  ${LLVM_Analysis_DIR}/ScopedNoAliasAA.cpp
  ${LLVM_Analysis_DIR}/ValueLattice.cpp
  ${LLVM_Analysis_DIR}/ValueLatticeUtils.cpp
  ${LLVM_Analysis_DIR}/ValueTracking.cpp
  ${LLVM_Analysis_DIR}/VectorUtils.cpp


  ${GeneratedMLSources}

  ADDITIONAL_HEADER_DIRS
  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Analysis

  DEPENDS
  buddy_intrinsics_gen
  ${MLDeps}

  LINK_LIBS
  ${MLLinkDeps}

  LINK_COMPONENTS
  BinaryFormat
  BuddyCore
  BuddyObject
  Object
  BuddyProfileData
  Support
  TargetParser
  )
